<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Welcome!</title>
</head>
<body>
	<form name='loginForm' action="login" method='POST'>
		Login: <input type="text" name="login"><br>
		Password: <input type="password" name="password"><br>
		<input name="submit" type="submit" value=" Sign In " />
	</form>
	
	<c:if test="${not empty loginError}">
		Error: ${loginError}
	</c:if>
	<br>
	<br>
	<br>
	<p>Registration:</p>
	<form name='registrationForm' action="registration" method='POST'>
		Login: <input type="text" name="login"><br> 
		Password: <input type="password" name="password"><br>
		Confirm Password: <input type="password" name="confirm password"><br>
		Name: <input type="text" name="name"><br>
		Surname: <input type="text" name="surname"><br>
		<input name="submit" type="submit" value=" Create new account " />
	</form>
	
	<c:if test="${not empty registrationError}">
		Error: ${registrationError}
	</c:if>
</body>
</html>